#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include "QtSerialPort/QSerialPort"
#include "QtSerialPort/QSerialPortInfo"


namespace Ui {
class Widget;
}

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = nullptr);
    ~Widget();

    void SerialPortDataSend();
public slots:
    void pSlotUpdatecominfo();
    void SerialPortRecvMsgEvent();
private slots:
    void on_selectUpdateFile_clicked();

    void on_cmd_clicked();

private:
    Ui::Widget *ui;
    QString m_UpdateFilePath;
    QString m_ComName;
    QTimer *m_TimerScanComInfo;
    QSerialPort *m_SerialPort;
    bool m_PendingBySending;
};

#endif // WIDGET_H
